<script setup>
defineProps({
  tableColumns: { // 列名
    type: Array
  },
  tableData: { // 数据
    type: Array,
    default: []
  },
  pagination: {
    type: Object,
    default:{
      total: 10,
      current: 1,
      pageSize: 5,
    },
    required:false
  }
})

</script>

<template>
  <slot name="header"></slot>
  <a-table :columns="tableColumns" :data-source="tableData" :pagination="pagination">
    <template #bodyCell="{ column }">
      <template v-if="column.key === 'operation'">
        <span>
          <a>禁用</a>
          <a-divider type="vertical" />
          <a>编辑</a>
          <a-divider type="vertical" />
          <a>删除</a>
        </span>
      </template>
    </template>
  </a-table>
  <slot name="footer"></slot>
</template>

<style scoped>
</style>